#include "Scene.h"

Scene::~Scene()
{
	int count = m_Entitices.size();
	for (int i = 0; i < count; i++)
	{
		Entity* temp = m_Entitices[i];
		SAFE_DEL(temp);
	}
	m_Entitices.resize(0);
}

__VOID Scene::Update(__FLOAT deltaTime)
{
	int count = m_Entitices.size();
	for (int i = 0; i < count; i++)
	{
		m_Entitices[i]->Update(deltaTime);
	}
}

__VOID Scene::Draw()
{
	int count = m_Entitices.size();
	for (int i = 0; i < count; i++)
	{
		m_Entitices[i]->Draw();
	}
}

__VOID Scene::Exit()
{

}

__VOID Scene::Add(Entity* obj)
{
	m_Entitices.push_back(obj);
}